using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using DownloadLibrary.Classes;

namespace pdbtester
{
    class Program
    {
        static void Main(string[] args)
        {
            Microsoft.CSharp.CSharpCodeProvider test = new Microsoft.CSharp.CSharpCodeProvider();
            List<Stream> containers = new List<Stream>();

            DownloadLibrary.PEParsing.PEFile tempPe =
                new DownloadLibrary.PEParsing.PEFile(@"C:\WINNT\Microsoft.NET\Framework\v2.0.50727\Microsoft.Build.Conversion.dll");
            string pdbTarget = tempPe.PdbFileName;

            PdbParser
                tempParser = new PdbParser("c:\\testlib\\system.pda");
            
            PdbParser
                tempParser2 = new PdbParser("c:\\testlib\\system.pdb");

            //tempParser.
            //tempParser2.SaveToPath("c:\\final");
            //tempParser.SaveToPath("c:\\final");
            //PdbPartialStream tempStream = 
            //    tempParser.GetPartialStream(1);
            ////tempStream.
            //PdbInfoStreamReader tempReader = new PdbInfoStreamReader(tempStream.DecompossedPartialStream);
            //tempReader.ParseStream();
            
            //tempParser.UpdateTargetStream(tempStream, new MemoryStream(), 1);

            Console.WriteLine(tempPe.PdbAge);
            Console.WriteLine(tempPe.PdbGuid.ToString());
            Console.WriteLine(tempParser.PdbStreamHeaderReader.Guid.ToString());
            Console.WriteLine(tempParser2.PdbStreamHeaderReader.Guid.ToString());
            Console.WriteLine(tempParser.PdbStreamHeaderReader.Age);
            Console.WriteLine(tempParser2.PdbStreamHeaderReader.Age);
            Console.WriteLine(tempParser.PdbStreamHeaderReader.TimeDateStamp);
            Console.WriteLine(tempParser2.PdbStreamHeaderReader.TimeDateStamp);
            Console.WriteLine(tempParser.PdbStreamHeaderReader.Version);
            Console.WriteLine(tempParser2.PdbStreamHeaderReader.Version);
            Console.ReadLine();


        }
    }
}
